package com.easyUploader.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.common.mybaits.CustomPage;
import com.easyUploader.entity.dao.FileStorage;
import com.easyUploader.entity.dto.FileInfoDto;
import com.easyUploader.entity.vo.FileChunkVo;
import com.easyUploader.entity.dto.FileUpLoadResultDto;
import com.easyUploader.entity.vo.FileUploadCheckVo;
import com.easyUploader.property.LocalFileProperty;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;
import java.util.List;

/**
 * <p>
 * 文件存储 服务类
 * </p>
 *
 * @author 大忽悠
 * @since 2022年10月29日
 */
public interface IFileStorageService extends IService<FileStorage> {

    void saveLocalStorage(String resultFileName, FileChunkVo fileChunkVo);

    FileUpLoadResultDto checkFileUpLoad(FileUploadCheckVo fileUploadCheckVo);

    FileStorage doCheckFileUpLoad(String fileMd5, String fileSavePath, String fileName, String fileVisitUrl,String bucketName);

    void downLoadByBucketAndFileName(String bucket, String name, HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException;

    Boolean deleteByBucketAndFileName(String bucket, String name, HttpServletRequest request, HttpServletResponse response);

    void visitByBucketAndFileName(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException;

    void visitShareByFileName(HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException;

    void downLoadShareFile(String filePath, HttpServletRequest request, HttpServletResponse response) throws UnsupportedEncodingException;
}
